<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>二维码</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="../../plugins/mui/mui.min.css">
    <script src="../../js/statistics.js"></script>
    <style type="text/css">
        *{
            box-sizing: border-box;
            font-family: 'Microsoft YaHei';
        }
        body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form,  input, p, table, th, td ,select,option{
            padding: 0;
            margin: 0;
            list-style: none;
        }
        body{
            padding-top: 45px;
        }
        /*title的样式覆盖*/
        .mui-bar{
            background-color:#2a2c33;
            top:0;
        }
        .mui-title{
            color:#fff;
        }
        a.mui-action-back{
            color:#fff;
        }
        .erweima{
            display: inline-block;
            padding:0;
            margin-bottom: 38px;
            width:50vw;
            height:50vw;
            background: url('../../images/my/index/recommend_code.png') no-repeat center center;
            background-size:contain;
        }
        .my-content{
            text-align: center;
            padding-top:23px;
        }
        .my-code{
            background: #E96D61;
            width:100%;
            margin-top:-5vw;
            padding: 12vw 0 6vw 0;
            border-top-left-radius: 53px;
            border-top-right-radius: 53px;
            text-align: center;
        }
        .top-img{
            background: url("../../images/my/index/recommend_img.png") no-repeat center center;
            background-size: contain;
            width:90vw;
            /*1.18855*/
            height:75vw;
            margin:0 auto;
        }
        #one{
            display: block;
            margin:0 auto;
            text-align: center;
            width:80vw;
            height:38px;

            background: #ffffff;
            font-size: 15px;
            border-radius: 48px;
            line-height: 38px;
            color:#E96D61;
        }
        #one:active{
            opacity: 0.8;
        }
    </style>
</head>
<body>
<header class="mui-bar ">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">二维码</h1>
</header>
    <div class="my-content">
        <div class="top-img"></div>
        <div class="my-code">
            <div class="erweima"></div>
            <a id="one">一键复制下载链接</a>
        </div>
    </div>
<!--<div class="title">-->
<!--</div>-->
<!--<div class="main">-->
    <!--<div class="erweima"></div>-->
<!--</div>-->

<script type="text/javascript" src='../../plugins/jquery/jquery-3.1.0.min.js'></script>
<script src="../../plugins/mui/mui.min.js"></script>
<script type="text/javascript">
    mui.init({
// 				statusBarBackground: '#43ac45',//ios下设置顶部背景色
    });

    mui.plusReady(function(){
        //关闭等待框
        plus.nativeUI.closeWaiting();
        //显示当前页面
        mui.currentWebview.show('slide-in-right',200);
        var topImgH=$(".top-img").css("height");
        console.log($('.my-code').css("height"))
        $(".my-code").css("min-height",document.body.clientHeight-parseFloat(topImgH)-15);
        $('#one').click(function(){
        	if(plus.os.name == 'iOS'){
        		var UIPasteboard  = plus.ios.importClass("UIPasteboard");
	            var generalPasteboard = UIPasteboard.generalPasteboard();
	            // 设置/获取文本内容:
	            generalPasteboard.setValueforPasteboardType("http://a.app.qq.com/o/simple.jsp?pkgname=com.zizailiyang.city", "public.utf8-plain-text");
        	}else{
        		var Context = plus.android.importClass("android.content.Context");
				var main = plus.android.runtimeMainActivity();
				var clip = main.getSystemService(Context.CLIPBOARD_SERVICE);
				plus.android.invoke(clip,"setText","http://a.app.qq.com/o/simple.jsp?pkgname=com.zizailiyang.city");
        	}
            mui.toast('复制成功');
        })
    });

</script>
</body>
</html>
